package com.wentao.thisCommon.common;

import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;

import java.lang.reflect.Type;

public class GsonConvertDouble implements JsonDeserializer<Double> {


    public Double deserialize(JsonElement arg0, Type arg1, JsonDeserializationContext arg2) throws JsonParseException {

        if (null == arg0) {
            return null;
        }

        return arg0.getAsDouble();
    }

}
